﻿using Api.Application.Command.Deion;
using Api.DTO;
using ErrorCode;
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Api.Controllers
{
    /// <summary>
    /// 部门控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    //[Authorize]
    public class DeionController : ControllerBase
    {
        private readonly IMediator mediator;

        public DeionController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        [HttpGet]
        public Task<ApiPaging<DeionDTO>> GetDeion([FromQuery]GetDeionCommand request)
        {
            return mediator.Send(request);
        }
    }
}
